<div class="exito"><?php echo $msg ?></div>
<script>
 $('.exito').fadeOut(5000);
</script>